#include <stdio.h>
int days(int year,int month,int day)
{
    int i,count=0;
    int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    if((year%100!=0)&&(year%4==0)||(year%400==0))
    a[2]=29;
    for(i=0;i<month;i++)
        count+=a[i];
    count+=day;
    return count;
}
int main()
{
    int year,month,day;
    printf("输入年、月、日: \n");
    scanf("%d %d %d",&year,&month,&day);
    printf("%d月%d日是%d年的第%d天",month,day,year,days(year,month,day));
    return 0;
}
